package ch7;

//线程1:输出信息
public class Thread1 extends Thread {
	public Thread1(String n) {
		super(n);
	}

	// start一般不重写
	@Override
	public void run() {
		for (int i = 1; i <= 20; i++) {
			System.out.println(super.getName() + ": This is run " + i);
			super.yield();
		}

		System.out.println(super.getName() + "输出结束");
	}
}
